<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">
    <div class="row">
        <div class="col-md-12">
            <!-- START BORDERED TABLE SAMPLE -->
            <div class="panel panel-default" ng-class="{'panel-panel-toggled':currentView.key=='GROUP_VIEW'}">
                <div class="panel-heading">
                    <h3 class="panel-title">章节列表</h3>
                    <ul class="panel-controls" ng-show="currentView.key!='GROUP_VIEW'">
                        <li><a href="javascript:void(0);" ng-click="expandPanel('GROUP_VIEW')"><span
                                class="fa fa-expand"></span></a></li>
                    </ul>
                </div>
                <div ng-show="currentView.key=='GROUP_VIEW'">
                    <div class="panel-body">
                        <p>本页面可对学习地图下的章节进行查询、新增、编辑等管理操作。</p>
                    </div>
                    <div class="panel-body table-responsive">
                        <table class="table table-striped table-bordered" ng-show="groupList.length>0">
                            <thead>
                            <tr>
                                <th>图片</th>
                                <th>章节名称</th>
                                <th>章节编码</th>
                                <th>序号</th>
                                <th>是否有效</th>
                                <th>版本</th>
                                <th>描述</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="group in groupList | orderBy:['active','sort']">
                                <td><img ng-src="{{group.picture | faceUrl}}" width="100px"></td>
                                <td>{{group.name}}</td>
                                <td>{{group.code}}</td>
                                <td>{{group.sort}}</td>
                                <td>{{group.active?"是":"否"}}</td>
                                <td>
                                    <ul>
                                        <li>是否最新版本：{{!!group.topVersion?'是':'否'}}</li>
                                        <li>版本号：{{group.version}}</li>
                                        <li>GUID: {{group.guid}}</li>
                                    </ul>
                                </td>
                                <td>{{group.remark}}</td>
                                <td width="30%">{{group.status | EnumFilter:'StudyClassGroupStatusEnum'}}</td>
                                <td>
                                    <div class="btn-group">
                                        <a href="javascript:void(0);" data-toggle="dropdown"
                                           class="btn btn-primary dropdown-toggle">记录操作<span class="caret"></span></a>
                                        <ul class="dropdown-menu" role="menu" style="text-align: center;">
                                            <li ng-click="editClassGroup(group)"><a>编辑信息</a></li>
                                            <li ng-show="!group.active" ng-click="setGroupValid(group)"><a>设为有效</a></li>
                                            <li ng-show="!!group.active" ng-click="setGroupInvalid(group)"><a>设为无效</a>
                                            </li>
                                            <li ng-click="setupStudyClass(group)"><a>配置课程</a></li>
                                            <li ng-click="setupBadge(group)"><a>配置勋章</a></li>
                                            <li ng-click="setupEventURL(group)"><a>配置活动</a></li>
                                            <li ng-click="setupEventStudyMap(group)"><a>配置传送门</a></li>
                                            <li ng-click="setupQuestionnaire(group)"><a>配置问卷</a></li>
                                            <li ng-click="publish(group)"><a>发布</a></li>
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-info" ng-click="addClassGroup()"><i class="fa fa-plus"></i>新增章节</button>
                        <button class="btn btn-info" ng-click="refreshClassGroup()"><i class="fa fa-refresh"></i>刷新
                        </button>
                    </div>
                </div>
            </div>
            <!-- END BORDERED TABLE SAMPLE -->
        </div>
    </div>
    <!-- END PAGE CONTENT WRAPPER -->
</div>

<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap" ng-show="!!currentStudyClassGroupId">
    <div class="row">
        <div class="col-md-12">
            <!-- START BORDERED TABLE SAMPLE -->
            <div class="panel panel-default" ng-class="{'panel-panel-toggled':currentView.key=='CLASS_VIEW'}">
                <div class="panel-heading">
                    <h3 class="panel-title">课程列表</h3>
                    <ul class="panel-controls" ng-show="currentView.key!='CLASS_VIEW'">
                        <li><a href="javascript:void(0);" ng-click="expandPanel('CLASS_VIEW')"><span
                                class="fa fa-expand"></span></a></li>
                    </ul>
                </div>
                <div ng-show="currentView.key=='CLASS_VIEW'">
                    <div class="panel-body">
                        <p>本页面可对章节下的课程进行查询、新增、编辑等管理操作。</p>
                    </div>
                    <div class="panel-body table-responsive">
                        <table class="table table-striped table-bordered" ng-show="classList.length>0">
                            <thead>
                            <tr>
                                <th>图片</th>
                                <th>课程名称</th>
                                <th>序号</th>
                                <th>类型</th>
                                <th>对象ID</th>
                                <th>是否有效</th>
                                <th>版本</th>
                                <th>描述</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="studyClass in classList | orderBy:['active','sort']">
                                <td><img ng-src="{{studyClass.picture | faceUrl}}" width="100px"></td>
                                <td>{{studyClass.name}}</td>
                                <td>{{studyClass.sort}}</td>
                                <td>{{studyClass.type | EnumFilter:'StudyClassTypeEnum'}}</td>
                                <td>{{studyClass.targetId}}</td>
                                <td>{{studyClass.active?"是":"否"}}</td>
                                <td>
                                    <ul>
                                        <li>是否最新版本：{{!!studyClass.topVersion?'是':'否'}}</li>
                                        <li>版本号：{{studyClass.version}}</li>
                                        <li>GUID: {{studyClass.guid}}</li>
                                    </ul>
                                </td>
                                <td width="30%">{{studyClass.remark}}</td>
                                <td>
                                    <div class="btn-group">
                                        <a href="javascript:void(0);" data-toggle="dropdown"
                                           class="btn btn-primary dropdown-toggle">记录操作<span class="caret"></span></a>
                                        <ul class="dropdown-menu" role="menu" style="text-align: center;">
                                            <li ng-click="editStudyClass(studyClass)"><a>编辑信息</a></li>
                                            <li ng-show="!studyClass.active" ng-click="setClassValid(studyClass)">
                                                <a>设为有效</a>
                                            </li>
                                            <li ng-show="!!studyClass.active" ng-click="setClassInvalid(studyClass)">
                                                <a>设为无效</a>
                                            </li>
                                            <li ng-show="studyClass.type=='GAUGE'" ng-click="setGauge(studyClass)">
                                                <a>设置量表</a>
                                            </li>
                                            <li ng-show="studyClass.type=='EXAMINATION'" ng-click="setExamination(studyClass)">
                                                <a>设置测试题</a>
                                            </li>
                                            <li ng-show="studyClass.type=='EXAMINATION_TIPS'" ng-click="setExaminationTips(studyClass)">
                                                <a>设置测试题-做题提示</a>
                                            </li>
                                            <li ng-show="studyClass.type=='H5'" ng-click="setH5(studyClass)">
                                                <a>设置H5</a>
                                            </li>
                                            <li ng-show="studyClass.type=='MICRO_H5'" ng-click="setMicroH5(studyClass)">
                                                <a>设置微课</a>
                                            </li>
                                            <li ng-show="studyClass.type=='TASK'" ng-click="setTask(studyClass)">
                                                <a>设置任务</a>
                                            </li>
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-info" ng-click="addStudyClass()"><i class="fa fa-plus"></i>新增课程</button>
                        <button class="btn btn-info" ng-click="refreshStudyClass()"><i class="fa fa-refresh"></i>刷新
                        </button>
                    </div>
                </div>
            </div>
            <!-- END BORDERED TABLE SAMPLE -->
        </div>
    </div>
    <!-- END PAGE CONTENT WRAPPER -->
</div>

<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap" ng-show="!!currentStudyClassId && !!currentStudyClassGroupId">
    <div class="row">
        <div class="col-md-12">
            <!-- START BORDERED TABLE SAMPLE -->
            <div class="panel panel-default" ng-class="{'panel-panel-toggled':currentView.key=='TASK_VIEW'}">
                <div class="panel-heading">
                    <h3 class="panel-title">任务列表</h3>
                    <ul class="panel-controls" ng-show="currentView.key!='TASK_VIEW'">
                        <li><a href="javascript:void(0);" ng-click="expandPanel('TASK_VIEW')"><span
                                class="fa fa-expand"></span></a></li>
                    </ul>
                </div>
                <div ng-show="currentView.key=='TASK_VIEW'">
                    <div class="panel-body">
                        <p>本页面可对课程下的任务进行查询、新增、编辑等管理操作。</p>
                    </div>
                    <div class="panel-body table-responsive">
                        <table class="table table-striped table-bordered"
                               ng-show="currentTaskStudyClass.taskStudies.length>0">
                            <thead>
                            <tr>
                                <th>任务标题</th>
                                <th>序号</th>
                                <th>是否有效</th>
                                <th>是否必须完成</th>
                                <th>是否需要审批</th>
                                <th>内容</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="task in currentTaskStudyClass.taskStudies | orderBy:['sort']">
                                <td>{{task.subject}}</td>
                                <td>{{task.sort}}</td>
                                <td>{{task.active?"是":"否"}}</td>
                                <td>{{task.required?"是":"否"}}</td>
                                <td>{{task.isApprove?"是":"否"}}</td>
                                <td width="30%">{{task.content}}</td>
                                <td>
                                    <div class="btn-group">
                                        <a href="javascript:void(0);" data-toggle="dropdown"
                                           class="btn btn-primary dropdown-toggle">记录操作<span class="caret"></span></a>
                                        <ul class="dropdown-menu" role="menu" style="text-align: center;">
                                            <li ng-click="editTaskStudy(task)"><a>编辑信息</a></li>
                                            <li ng-show="!task.active" ng-click="setTaskValid(task)"><a>设为有效</a></li>
                                            <li ng-show="!!task.active" ng-click="setTaskInvalid(task)"><a>设为无效</a></li>
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-info" ng-click="addTaskStudy()"><i class="fa fa-plus"></i>新增任务</button>
                        <button class="btn btn-info" ng-click="refreshTaskStudy()"><i class="fa fa-refresh"></i>刷新
                        </button>
                    </div>
                </div>
            </div>
            <!-- END BORDERED TABLE SAMPLE -->
        </div>
    </div>
    <!-- END PAGE CONTENT WRAPPER -->
</div>